package cn.cdiothree.dataobject;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.io.Serializable;
import java.util.List;

import cn.cdiothree.enums.OrderStatusEnum;
import cn.cdiothree.enums.PayStatusEnum;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * 商品订单实体类
 */
@Data

public class ProductOrder implements Serializable {

    /**
     * 订单Id
     */
    @TableId
    private String orderId;

    /**
     * 用户姓名
     */
    private String buyerName;

    /**
     * 用户电话
     */
    private String buyerPhone;

    /**
     * 用户地址
     */
    private String buyerAddress;

    /**
     * 用户Id
     */
    private Integer userId;

    /**
     * 订单总金额
     */
    private BigDecimal orderAmount;

    /**
     * 订单状态：默认0为新下单
     */
    private Integer orderStatus= OrderStatusEnum.NEW.getCode();

    /**
     * 支付状态，默认0为未支付
     */
    private Integer payStatus= PayStatusEnum.WAIT.getCode();


    /**
     * 创建时间
     */
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    private LocalDateTime updateTime;

    public ProductOrder() {
    }

    public ProductOrder(String orderId, String buyerName, String buyerPhone, String buyerAddress, Integer userId, BigDecimal orderAmount) {
        this.orderId = orderId;
        this.buyerName = buyerName;
        this.buyerPhone = buyerPhone;
        this.buyerAddress = buyerAddress;
        this.userId = userId;
        this.orderAmount = orderAmount;
    }
}
